///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "worddialog.h"

///////////////////////////////////////////////////////////////////////////

WordDialog::WordDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 640,300 ), wxSize( 640,-1 ) );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_listCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES );
	bSizer3->Add( m_listCtrl, 1, wxALL|wxEXPAND, 5 );
	
	mainSizer->Add( bSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 3, 2, 0, 0 );
	fgSizer2->AddGrowableCol( 1 );
	fgSizer2->AddGrowableCol( 2 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText41 = new wxStaticText( this, wxID_ANY, _("Word or phrase:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText41->Wrap( -1 );
	fgSizer2->Add( m_staticText41, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrlWord = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer2->Add( m_textCtrlWord, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, _("Translation:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	fgSizer2->Add( m_staticText5, 0, wxALL, 5 );
	
	m_textCtrlTran = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
	fgSizer2->Add( m_textCtrlTran, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, _("Sound file:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	bSizer7->Add( m_staticText12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_buttonFile = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxSize( 30,-1 ), 0 );
	bSizer7->Add( m_buttonFile, 0, wxALL, 5 );
	
	fgSizer2->Add( bSizer7, 1, wxEXPAND, 5 );
	
	m_textCtrlFile = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer2->Add( m_textCtrlFile, 0, wxALL|wxEXPAND, 5 );
	
	mainSizer->Add( fgSizer2, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* buttonSizer;
	buttonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	m_buttonOk = new wxButton( this, wxID_OK, _("&Ok"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonOk->SetDefault(); 
	buttonSizer->Add( m_buttonOk, 0, wxALL, 5 );
	
	m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( m_buttonCancel, 0, wxALL, 5 );
	
	m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonDelete->Enable( false );
	
	buttonSizer->Add( m_buttonDelete, 0, wxALL, 5 );
	
	m_buttonInput = new wxButton( this, wxID_ANY, _("Input"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( m_buttonInput, 0, wxALL, 5 );
	
	m_buttonPlay = new wxButton( this, wxID_ANY, _("Play"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonPlay->Enable( false );
	
	buttonSizer->Add( m_buttonPlay, 0, wxALL, 5 );
	
	mainSizer->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ) );
	m_listCtrl->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( WordDialog::OnEnterWindow ), NULL, this );
	m_listCtrl->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_listCtrl->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( WordDialog::OnLeftDClick ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEventHandler( WordDialog::OnWordDeselected ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( WordDialog::OnWordDeselected ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( WordDialog::OnWordSelected ), NULL, this );
	m_textCtrlWord->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_textCtrlTran->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnFileClick ), NULL, this );
	m_textCtrlFile->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnOkClick ), NULL, this );
	m_buttonOk->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnCancelClick ), NULL, this );
	m_buttonCancel->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnDeleteClick ), NULL, this );
	m_buttonDelete->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonInput->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnInputClick ), NULL, this );
	m_buttonInput->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonPlay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnPlayClick ), NULL, this );
	m_buttonPlay->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
}

WordDialog::~WordDialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ) );
	m_listCtrl->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( WordDialog::OnEnterWindow ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( WordDialog::OnLeftDClick ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEventHandler( WordDialog::OnWordDeselected ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( WordDialog::OnWordDeselected ), NULL, this );
	m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( WordDialog::OnWordSelected ), NULL, this );
	m_textCtrlWord->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_textCtrlTran->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnFileClick ), NULL, this );
	m_textCtrlFile->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnOkClick ), NULL, this );
	m_buttonOk->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnCancelClick ), NULL, this );
	m_buttonCancel->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnDeleteClick ), NULL, this );
	m_buttonDelete->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonInput->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnInputClick ), NULL, this );
	m_buttonInput->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	m_buttonPlay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WordDialog::OnPlayClick ), NULL, this );
	m_buttonPlay->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( WordDialog::OnKeyDown ), NULL, this );
	
}
